package com.spring.mvc.controller;

import static com.spring.mvc.util.UrlManager.*;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.spring.mvc.pojo.CallResult;
import com.spring.mvc.service.NewsService;

@Controller
@RequestMapping(NEWS_PATH_MAPP)
public class NewsController {

	@Autowired
	private NewsService newsService;
	
	@RequestMapping(URL_NEWS_FIND_BY_ID)
	public @ResponseBody CallResult findById(int id){
		CallResult result=newsService.findById(id);
		return result;
	}
}
